package net.itgoo.parkingpay.ui.rfid;

import net.itgoo.parkingpay.vendor.mvp.ParkingBasePresenter;
import net.itgoo.parkingpay.vendor.mvp.ParkingBaseView;
import net.itgoo.parkingpay.vendor.mvp.ParkingMVPLoadDataCallback;


/**
 * Created by apple on 16/11/21.
 */
public interface ParkingRfidContract {

    interface View extends ParkingBaseView<Presenter> {
        void showBindInfo(String plate, String number, boolean auto);
        void showLoading();
        void showBindSuccess();
        void showBindFailure(String error);
        void showAutoSuccess();
        void showAutoFailure(String error);
    }

    interface Presenter extends ParkingBasePresenter {
        void getData();
        void bind(String phone, String tag, String code);
        void auto(boolean open);
    }

    interface DataSource {
        void getData(ParkingMVPLoadDataCallback callback);
        void bind(String userId, String plate, String phone, String tag, String code, ParkingMVPLoadDataCallback callback);
        void auto(String cardId, int isAuto, ParkingMVPLoadDataCallback callback);
        void cancel();
    }
}
